package com.ruoyi.service.quality.impl;

import com.ruoyi.domain.quality.MesQualityInspectionItem;
import com.ruoyi.mapper.quality.MesQualityInspectionItemMapper;
import com.ruoyi.service.quality.IMesQualityInspectionItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 检验项目记录Service业务层处理
 * 
 * @author ruoyi
 */
@Service
public class MesQualityInspectionItemServiceImpl implements IMesQualityInspectionItemService
{
    @Autowired
    private MesQualityInspectionItemMapper mesQualityInspectionItemMapper;

    /**
     * 查询检验项目记录
     * 
     * @param itemId 检验项目记录主键
     * @return 检验项目记录
     */
    @Override
    public MesQualityInspectionItem selectMesQualityInspectionItemByItemId(Long itemId)
    {
        return mesQualityInspectionItemMapper.selectMesQualityInspectionItemByItemId(itemId);
    }

    /**
     * 查询检验项目记录列表
     * 
     * @param mesQualityInspectionItem 检验项目记录
     * @return 检验项目记录
     */
    @Override
    public List<MesQualityInspectionItem> selectMesQualityInspectionItemList(MesQualityInspectionItem mesQualityInspectionItem)
    {
        return mesQualityInspectionItemMapper.selectMesQualityInspectionItemList(mesQualityInspectionItem);
    }

    /**
     * 根据检验记录ID查询检验项目记录列表
     * 
     * @param inspectionId 检验记录ID
     * @return 检验项目记录集合
     */
    @Override
    public List<MesQualityInspectionItem> selectItemsByInspectionId(Long inspectionId)
    {
        return mesQualityInspectionItemMapper.selectItemsByInspectionId(inspectionId);
    }

    /**
     * 根据检验单号查询检验项目记录列表
     * 
     * @param inspectionCode 检验单号
     * @return 检验项目记录集合
     */
    @Override
    public List<MesQualityInspectionItem> selectItemsByInspectionCode(String inspectionCode)
    {
        return mesQualityInspectionItemMapper.selectItemsByInspectionCode(inspectionCode);
    }

    /**
     * 根据检验项目ID查询检验项目记录列表
     * 
     * @param itemId 检验项目ID
     * @return 检验项目记录集合
     */
    @Override
    public List<MesQualityInspectionItem> selectRecordsByItemId(Long itemId)
    {
        return mesQualityInspectionItemMapper.selectRecordsByItemId(itemId);
    }

    /**
     * 根据检验结果查询检验项目记录列表
     * 
     * @param result 检验结果
     * @return 检验项目记录集合
     */
    @Override
    public List<MesQualityInspectionItem> selectItemsByResult(String result)
    {
        return mesQualityInspectionItemMapper.selectItemsByResult(result);
    }

    /**
     * 批量新增检验项目记录
     * 
     * @param inspectionItems 检验项目记录列表
     * @return 结果
     */
    @Override
    public int insertBatchInspectionItems(List<MesQualityInspectionItem> inspectionItems)
    {
        return mesQualityInspectionItemMapper.insertBatchInspectionItems(inspectionItems);
    }

    /**
     * 新增检验项目记录
     * 
     * @param mesQualityInspectionItem 检验项目记录
     * @return 结果
     */
    @Override
    public int insertMesQualityInspectionItem(MesQualityInspectionItem mesQualityInspectionItem)
    {
        return mesQualityInspectionItemMapper.insertMesQualityInspectionItem(mesQualityInspectionItem);
    }

    /**
     * 修改检验项目记录
     * 
     * @param mesQualityInspectionItem 检验项目记录
     * @return 结果
     */
    @Override
    public int updateMesQualityInspectionItem(MesQualityInspectionItem mesQualityInspectionItem)
    {
        return mesQualityInspectionItemMapper.updateMesQualityInspectionItem(mesQualityInspectionItem);
    }

    /**
     * 批量删除检验项目记录
     * 
     * @param itemIds 需要删除的检验项目记录主键
     * @return 结果
     */
    @Override
    public int deleteMesQualityInspectionItemByItemIds(Long[] itemIds)
    {
        return mesQualityInspectionItemMapper.deleteMesQualityInspectionItemByItemIds(itemIds);
    }

    /**
     * 删除检验项目记录信息
     * 
     * @param itemId 检验项目记录主键
     * @return 结果
     */
    @Override
    public int deleteMesQualityInspectionItemByItemId(Long itemId)
    {
        return mesQualityInspectionItemMapper.deleteMesQualityInspectionItemByItemId(itemId);
    }
}